﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage/MasterPage3.master" AutoEventWireup="true" CodeFile="chi-tiet-tin.aspx.cs" Inherits="chi_tiet_tin" Title="Chi tiết tin" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="CSS/chi-tiet-tin.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        #menu-container ul li#khampha a
        {
            color:#ffffff;
            width:146px;
            line-height:49px;
            font-size:14px;
            font-weight:bold;
            text-decoration:none;
            display:block;
            background-image:url(Images/menu-bg_hover.jpg);
            background-repeat:repeat-x;    
             box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);    
            behavior: url(CSS/PIE.htc);  
             }
              #footer
             {
                bottom:-20px;
             }

    </style>
    <script type="text/javascript" language="javascript">
        function ShareToFaceBook()
        {
        var newWindow = window.open("http://www.facebook.com/sharer.php?u="+window.location.href,'','_blank');
        newWindow.focus();
        return false;
    }
    function ShareTo_Twitter() {
        window.open('http://twitter.com/home?status='+window.location.href,'','_blank');
    }
    function ShareTo_Zing() {
        window.open('http://link.apps.zing.vn/share?u=' + window.location.href, '', '_blank');
    }
    function ShareTo_GooglePlus() {
        window.open('http://link.apps.zing.vn/share?u=' + window.location.href, '', '_blank');
    }
    
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class=" clearfix">
        <div id="left-pane">
            <div id="post-content">
                
                    <h3><asp:Label ID="lblPostTitle" runat="server" Text="Label"></asp:Label></h3>
                    <p style="margin:5px;">
                        <span>Đăng bởi: </span><asp:Label ID="lblPostUserEmail" runat="server" Text="Label" CssClass="green"></asp:Label><span>Đăng ngày: </span><asp:Label
                            ID="lblDatePost" runat="server" Text="Label" CssClass="green"></asp:Label><span>Bình luận: </span>
                                <asp:Label ID="lblCountComment" runat="server" Text="Label" CssClass="green"></asp:Label><span>Lượt xem: </span>
                                    <asp:Label ID="lblCountViews" runat="server" Text="Label" CssClass="green"></asp:Label><span>Chuyên mục: </span>
                                        <asp:Label ID="lblPostTopic" runat="server" Text="Label" CssClass="green"></asp:Label>
                    </p>
                    <ul>
                        <asp:Repeater ID="rptOtherNews" runat="server">
                            <ItemTemplate>
                                <li>
                                    <a href='<%#"chi-tiet-tin.aspx?BaiVietID="+Eval("BaiVietID") %>'><%#Eval("TieuDe") %></a>
                                </li>
                            </ItemTemplate>
                        </asp:Repeater>
                        
                    </ul>
                    <div id="news-content">
                        <asp:Literal ID="ltrPostContent" runat="server"></asp:Literal>
                    </div>
                    
            </div>
            <div id="share">
                <span>Chia sẻ</span><img alt="Chia sẻ lên Facebook" title="Chia sẻ lên Facebook" src="Images/share-fb.jpg" style="cursor:pointer" onclick="ShareToFaceBook();" />
        <img alt="Chia sẻ lên Twitter" title="Chia sẻ lên Twitter" src="Images/share-tw.jpg" style="cursor:pointer" onclick="ShareTo_Twitter();" /><img alt="Chia sẻ lên Zing" title="Chia sẻ lên Zing" src="Images/share-zing.jpg" style="cursor:pointer" onclick="ShareTo_Zing();" />
        <img alt="Chia sẻ lên Google+" title="Chia sẻ lên Google+" src="Images/share-ggpl.jpg" style="cursor:pointer" onclick="ShareTo_Zing();" />
            </div>
               
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
        <asp:Repeater ID="Repeater1" runat="server">
            <ItemTemplate>
                    <div id="comment" class="clearfix" style="margin-top:15px;">
            <div id="rd-avatar" style="float:left;border:solid thin #eeeaea;padding:2px;">
                <img alt="avatar" src='<%#"Images/UserAvatar/"+Eval("Image") %>' width="42px" height="42px" />
            </div>
            <div style="float:left;margin-left:15px;">
                <p style="line-height:42px;"><span style="font-size:18px;font-weight:bold"><%#Eval("ShowName") %></span><span style="color:#a29f9f;border-bottom:solid thin #cbcaca;padding-bottom:3px;margin-left:15px;"><%#Eval("NgayDangBai")%></span></p>
            </div>
        </div>
         <div style="background-color:#fefefe;border:solid thin #e3dede;color:#5b5b5c;margin-top:10px;margin-bottom:15px;padding:5px;padding-bottom:15px;padding-top:15px;">
                <p style="line-height:20px;">
                    <%#Eval("NoiDung") %>
                </p>
            </div>
            </ItemTemplate>
        </asp:Repeater>
        <div id="comment-warmning">
            <p>Chỉ chấp nhận bình luận bằng tiếng Việt có dấu, những bình luận sai<a href="#" style="color:#1a8dac"> qui định</a> sẽ bị xóa.</p>
            </div>
            <div>
           <p style="margin-top:5px;"><asp:RequiredFieldValidator ID="RequiredFieldValidator1" 
                ControlToValidate="TextBox1" runat="server" 
                ErrorMessage="Bạn chưa nhập nội dung bình luận" Display="Dynamic" 
                ForeColor="Gray"></asp:RequiredFieldValidator></p>
        </div> 
            <div>
                <asp:TextBox ID="TextBox1" runat="server" TextMode="MultiLine" CssClass="comment-textbox" Text="Nhập nội dung" onclick="value=''"></asp:TextBox>
            </div>
        <div class="clearfix" style="padding-top:5px;padding-bottom:5px;margin-bottom:15px;">
        <div style="float:left">
            <p >
            <span style="line-height:31px;color:#aaa7a7;">Nhấn Shift + Enter để xuống dòng</span></p></div>
            <div style="float:right">
                <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                    <ProgressTemplate>
                        <img id="Img1" runat="server" alt="loading" src="~/Images/loading.gif" />
                    </ProgressTemplate>
                </asp:UpdateProgress>
                        <asp:Button ID="Button1" runat="server"
                        Text="Bình luận" CssClass="bl-button" ToolTip="Gửi bình luận" 
                    onclick="Button1_Click" />
            </div>
        </div>
        
        </ContentTemplate>
        </asp:UpdatePanel>
        </div>
        <div id="right-pane">
    <div id="hot-news">
        <div id="header-bg">
        <span>Cẩm nang ẩm thực</span>
        </div>
        <div id="hot-news-line"></div>
        <div id="hot-news-content">
                <ul>
                    <asp:Repeater ID="rptTopHotNews" runat="server">
                <ItemTemplate>
                    <li>
                        <div class="clearfix">
                            <div id="hot-news-content_img">
                              <div class='thumbnailList1'><img  alt=""  src='<%# Eval("HinhDaiDien") %>' /></div>
                            </div>
                            <div id="hot-news-content_right-wrapper">
                                <div>
                                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%#"chi-tiet-tin.aspx?BaiVietID="+Eval("BaiVietID") %>' Text='<%#Eval("TieuDe") %>'></asp:HyperLink>
                                </div>
                                <div style="margin-bottom:0;position:absolute;bottom:0;right:0">
                                    <span style="margin-right:8px;margin-left:5px;font-size:10px"><%#Eval("NgayTao") %></span>
                                <span style="margin-right:8px;font-size:10px">Đăng bởi</span><a class="username" style="font-size:10px" href='<%#"User/thong-tin-thanh-vien.aspx?UserID="+Eval("UserID") %>'><%#Eval("TenHienThi")%></a> 
                                </div>
                            </div>
                        </div>
                    </li>
                </ItemTemplate>
            </asp:Repeater>
                </ul>
            
        </div>
    </div>
   <div id="top-poster">
        <div id="top-poster-header"><span>Thành Viên Đăng Bài</span></div>
        <div id="top-post-header-content">
           
            <ul class="clearfix">
                 <asp:Repeater ID="rptTopPoster" runat="server">
                <ItemTemplate>
                    <li>
                        <a href='<%# "User/thong-tin-thanh-vien.aspx?UserID="+Eval("UserID") %>'><img alt="" width="50" height="50" src='<%#"Images/UserAvatar/"+ Eval("HinhDaiDien") %>' /></a>
                        <a class="displayname" href='<%# "User/thong-tin-thanh-vien.aspx?UserID="+Eval("UserID") %>'><%# Eval("TenHienThi") %></a>
                    </li>
                </ItemTemplate>
            </asp:Repeater>
            </ul>
        </div>
   </div>
   
    <div id="facebook-plugin" style="margin-top:5px;">
        <div class="fb-like-box" data-href="http://www.facebook.com/Phoamthuc.net" data-width="288" data-show-faces="true" data-border-color="#dfdfdf" data-stream="false" data-header="true"></div>
    </div>
</div>
    </div>
    <a href="dang-bai.aspx" title="Đăng Bài" class="post-button"></a>
    <script type="text/javascript">
        $(".thumbnailList1 img").MyThumbnail({
            thumbWidth: 50,
            thumbHeight: 50,
            imageDivClass: "myPic"
        });
        
    </script>
    <script type="text/javascript">        (function(d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s); js.id = id;
            js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
            fjs.parentNode.insertBefore(js, fjs);
        } (document, 'script', 'facebook-jssdk'));</script>
</asp:Content>

